/*
Author: Surpass-HC
Source: https://gitee.com/hxchuan000/clpc-1
Mail: surpass-hc@qq.com
*/
#ifndef __CRC_CALCULATE_H__
#define __CRC_CALCULATE_H__
#include <typecomm.h>

uint8_t calcXorCrc8(const uint8_t *inbuffer, int insize);
uint8_t calcSumCrc8(const uint8_t *inbuffer, int insize);
uint16_t calcSumCrc16(const uint8_t *inbuffer, int insize);
uint32_t calcSumCrc32(const uint8_t *inbuffer, int32_t insize);
uint16_t calcMbusCrc16(const uint8_t *inbuf, int inlen);
#define HASH_CRC_CALCULATE_ENABLE 1
#if HASH_CRC_CALCULATE_ENABLE
uint8_t calcHashCrc8(const uint8_t *ptr, int len);
uint16_t calcHashCrc16(const uint8_t *ptr, int length);
uint32_t calcHashCrc32(const uint8_t *buf, int size);
#endif
#endif
